package com.lantosec.hmrp.modules.category.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.category.entity.AssetsCheckPlan;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 盘点计划 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="AssetsCheckPlan对象", description="盘点计划")
public class AssetsCheckPlanVO extends BaseVO<AssetsCheckPlan> {
    private static final long serialVersionUID = 1L;


    public AssetsCheckPlanVO(AssetsCheckPlan entity){
        this.planId = entity.getPlanId();
        this.planName = entity.getPlanName();
        this.planType = entity.getPlanType();
        this.categoryList = entity.getCategoryList();
        this.beginDate = entity.getBeginDate();
        this.endDate = entity.getEndDate();
        this.planState = entity.getPlanState();
        this.reviewUserId = entity.getReviewUserId();
        this.reviewUser = entity.getReviewUser();
        this.createTime = entity.getCreateTime();
        this.createUserId = entity.getCreateUserId();
        this.createUser = entity.getCreateUser();
        this.editorTime = entity.getEditorTime();
        this.editorUserId = entity.getEditorUserId();
        this.editorUser = entity.getEditorUser();
        this.schedule = entity.getSchedule();
        this.aCount = entity.getACount();
        this.pCount = entity.getPCount();
        this.reviewProgress = entity.getReviewProgress();
    }

    @Override
    public AssetsCheckPlan convertToEntity(){
        return new AssetsCheckPlan(this);
    }


    @ApiModelProperty(value = "盘点计划ID")
    private String planId;

    @ApiModelProperty(value = "计划名称")
    private String planName;

    @ApiModelProperty(value = "计划类型(1区域 2部门 )")
    private Integer planType;

    @ApiModelProperty(value = "资产类别(可多类别，所有类别时为空)")
    private String categoryList;

    @ApiModelProperty(value = "计划开始日期")
    private String beginDate;

    @ApiModelProperty(value = "计划结束日期")
    private String endDate;

    @ApiModelProperty(value = "计划状态(0正常1结束2过期3终止)")
    private Integer planState;

    @ApiModelProperty(value = "盘点结果审核人ID")
    private String reviewUserId;

    @ApiModelProperty(value = "盘点结果审核人")
    private String reviewUser;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人ID")
    private String createUserId;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "编辑时间")
    private Date editorTime;

    @ApiModelProperty(value = "编辑人ID")
    private String editorUserId;

    @ApiModelProperty(value = "编辑人")
    private String editorUser;

    @TableField(exist = false)
    @ApiModelProperty(value = "盘点总进度")
    private Double schedule;

    @TableField(exist = false)
    @ApiModelProperty(value = "盘点人数")
    private Integer pCount;

    @TableField(exist = false)
    @ApiModelProperty(value = "资产总数")
    private Integer aCount;

    @TableField(exist = false)
    @ApiModelProperty(value = "审核进度")
    private Double reviewProgress;

}
